fix: event leaks so that grids work with textfields #8775
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes
Opening as I finally fixed the existing tests, there are still oddities around behaviours. I started with moving useTypeSelect from capture to bubble phase and then proceeded to deal with the fallout from that. I also moved a few things, such as useSelect and useSelectableCollection to useKeyboard
I'm beginning to reach the conclusion that the current useKeyboard is actually more harmful to our goal rather than helpful.
We stopPropagation on everything, even if we don't handle that key.
We then have to explicitly continuePropagation for some set of keys.
This then interferes with listeners farther up which expect it to be stopped, and much now stop it themselves.
This gets even trickier if they are nested in reverse sometimes as well, calling continue is just too powerful, or too hard to predictably stop.
I think we should consider not stopping by default anymore. Only call stop on the events which actually result in something we handle and really shouldn't continue.
Please share any opinions on this matter. I'm still mulling it over.
✅ Pull Request Checklist:
📝 Test Instructions:
🧢 Your Project: